#include<iostream>
using namespace std;

class Node {	
public:
	int data;
	Node* next;
	Node() {
		data = {};
		next = NULL;
	}
	Node(int num, Node* link = NULL) {
		data = num;
		next = link;
	}
};

class SqList {

public:
	Node* head;
	SqList() {
		head = new Node();
		Node* p = head;
		int num;

		do {
			cin >> num;
			p->next = new Node(num);
			p = p->next;
		} while (getchar() != '\n');
	}
};